package com.hamilton.erik.pt.core.enumeration;

public enum Gender {

	MALE("Male"), FEMALE("Female"), UNKNOWN("Uknown");
	
	private String gender;
	
	private Gender(String gender) {
		this.gender = gender;
	}
	
	public String getGender() {
		return gender;
	}
	
	public static Gender fromValue(String value) {
		for(Gender gender : values()) {
			if(gender.getGender().equalsIgnoreCase(value)) {
				return gender;
			}
		}
		
		return null;
	}
	
	public String toString() {
		return gender;
	}
}
